﻿using System;

namespace HalconDotNet
{
	/// <summary>Class grouping system information related functionality.</summary>
	// Token: 0x02000043 RID: 67
	public class HInfo
	{
		/// <summary>Query slots concerning information with relation to the operator get_operator_info.</summary>
		/// <returns>Slotnames of the operator get_operator_info.</returns>
		// Token: 0x06000933 RID: 2355 RVA: 0x0003C1A0 File Offset: 0x0003A3A0
		public static HTuple QueryOperatorInfo()
		{
			IntPtr proc = HalconAPI.PreCall(1108);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Query slots of the online-information concerning the operator get_param_info.</summary>
		/// <returns>Slotnames for the operator get_param_info.</returns>
		// Token: 0x06000934 RID: 2356 RVA: 0x0003C1D8 File Offset: 0x0003A3D8
		public static HTuple QueryParamInfo()
		{
			IntPtr proc = HalconAPI.PreCall(1109);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get operators with the given string as a substring of their name.</summary>
		/// <param name="pattern">Substring of the seeked names (empty $ less than = greater than $ all names). Default: "info"</param>
		/// <returns>Detected operator names.</returns>
		// Token: 0x06000935 RID: 2357 RVA: 0x0003C210 File Offset: 0x0003A410
		public static HTuple GetOperatorName(string pattern)
		{
			IntPtr proc = HalconAPI.PreCall(1110);
			HalconAPI.StoreS(proc, 0, pattern);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get default data type for the control parameters of a HALCON-operator.</summary>
		/// <param name="operatorName">Name of the operator. Default: "get_param_types"</param>
		/// <param name="outpCtrlParType">Default type of the output control parameters.</param>
		/// <returns>Default type of the input control parameters.</returns>
		// Token: 0x06000936 RID: 2358 RVA: 0x0003C250 File Offset: 0x0003A450
		public static HTuple GetParamTypes(string operatorName, out HTuple outpCtrlParType)
		{
			IntPtr proc = HalconAPI.PreCall(1111);
			HalconAPI.StoreS(proc, 0, operatorName);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out outpCtrlParType);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get number of the different parameter classes of a HALCON-operator.</summary>
		/// <param name="operatorName">Name of the operator. Default: "get_param_num"</param>
		/// <param name="inpObjPar">Number of the input object parameters.</param>
		/// <param name="outpObjPar">Number of the output object parameters.</param>
		/// <param name="inpCtrlPar">Number of the input control parameters.</param>
		/// <param name="outpCtrlPar">Number of the output control parameters.</param>
		/// <param name="type">System operator or user procedure.</param>
		/// <returns>Name of the called C-function.</returns>
		// Token: 0x06000937 RID: 2359 RVA: 0x0003C2A4 File Offset: 0x0003A4A4
		public static string GetParamNum(string operatorName, out int inpObjPar, out int outpObjPar, out int inpCtrlPar, out int outpCtrlPar, out string type)
		{
			IntPtr proc = HalconAPI.PreCall(1112);
			HalconAPI.StoreS(proc, 0, operatorName);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 4);
			HalconAPI.InitOCT(proc, 5);
			int num = HalconAPI.CallProcedure(proc);
			string result;
			num = HalconAPI.LoadS(proc, 0, num, out result);
			num = HalconAPI.LoadI(proc, 1, num, out inpObjPar);
			num = HalconAPI.LoadI(proc, 2, num, out outpObjPar);
			num = HalconAPI.LoadI(proc, 3, num, out inpCtrlPar);
			num = HalconAPI.LoadI(proc, 4, num, out outpCtrlPar);
			num = HalconAPI.LoadS(proc, 5, num, out type);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get the names of the parameters of a HALCON-operator.</summary>
		/// <param name="operatorName">Name of the operator. Default: "get_param_names"</param>
		/// <param name="outpObjPar">Names of the output objects.</param>
		/// <param name="inpCtrlPar">Names of the input control parameters.</param>
		/// <param name="outpCtrlPar">Names of the output control parameters.</param>
		/// <returns>Names of the input objects.</returns>
		// Token: 0x06000938 RID: 2360 RVA: 0x0003C340 File Offset: 0x0003A540
		public static HTuple GetParamNames(string operatorName, out HTuple outpObjPar, out HTuple inpCtrlPar, out HTuple outpCtrlPar)
		{
			IntPtr proc = HalconAPI.PreCall(1113);
			HalconAPI.StoreS(proc, 0, operatorName);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out outpObjPar);
			num = HTuple.LoadNew(proc, 2, num, out inpCtrlPar);
			num = HTuple.LoadNew(proc, 3, num, out outpCtrlPar);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get information concerning a HALCON-operator.</summary>
		/// <param name="operatorName">Name of the operator on which more information is needed. Default: "get_operator_info"</param>
		/// <param name="slot">Desired information. Default: "abstract"</param>
		/// <returns>Information (empty if no information is available)</returns>
		// Token: 0x06000939 RID: 2361 RVA: 0x0003C3B8 File Offset: 0x0003A5B8
		public static HTuple GetOperatorInfo(string operatorName, string slot)
		{
			IntPtr proc = HalconAPI.PreCall(1114);
			HalconAPI.StoreS(proc, 0, operatorName);
			HalconAPI.StoreS(proc, 1, slot);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get information concerning the operator parameters.</summary>
		/// <param name="operatorName">Name of the operator on whose parameter more information is needed. Default: "get_param_info"</param>
		/// <param name="paramName">Name of the parameter on which more information is needed. Default: "Slot"</param>
		/// <param name="slot">Desired information. Default: "description"</param>
		/// <returns>Information (empty in case there is no information available).</returns>
		// Token: 0x0600093A RID: 2362 RVA: 0x0003C400 File Offset: 0x0003A600
		public static HTuple GetParamInfo(string operatorName, string paramName, string slot)
		{
			IntPtr proc = HalconAPI.PreCall(1115);
			HalconAPI.StoreS(proc, 0, operatorName);
			HalconAPI.StoreS(proc, 1, paramName);
			HalconAPI.StoreS(proc, 2, slot);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Search names of all operators assigned to one keyword.</summary>
		/// <param name="keyword">Keyword for which corresponding operators are searched. Default: "Information"</param>
		/// <returns>Operators whose slot 'keyword' contains the keyword.</returns>
		// Token: 0x0600093B RID: 2363 RVA: 0x0003C450 File Offset: 0x0003A650
		public static HTuple SearchOperator(string keyword)
		{
			IntPtr proc = HalconAPI.PreCall(1116);
			HalconAPI.StoreS(proc, 0, keyword);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get keywords which are assigned to operators.</summary>
		/// <param name="operatorName">Substring in the names of those operators for which keywords are needed. Default: "get_keywords"</param>
		/// <returns>Keywords for the operators.</returns>
		// Token: 0x0600093C RID: 2364 RVA: 0x0003C490 File Offset: 0x0003A690
		public static HTuple GetKeywords(string operatorName)
		{
			IntPtr proc = HalconAPI.PreCall(1117);
			HalconAPI.StoreS(proc, 0, operatorName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get information concerning the chapters on operators.</summary>
		/// <param name="chapter">Operator class or subclass of interest. Default: ""</param>
		/// <returns>Operator classes (Chapter = ") or operator subclasses respectively operators.</returns>
		// Token: 0x0600093D RID: 2365 RVA: 0x0003C4D0 File Offset: 0x0003A6D0
		public static HTuple GetChapterInfo(HTuple chapter)
		{
			IntPtr proc = HalconAPI.PreCall(1118);
			HalconAPI.Store(proc, 0, chapter);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(chapter);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get information concerning the chapters on operators.</summary>
		/// <param name="chapter">Operator class or subclass of interest. Default: ""</param>
		/// <returns>Operator classes (Chapter = ") or operator subclasses respectively operators.</returns>
		// Token: 0x0600093E RID: 2366 RVA: 0x0003C518 File Offset: 0x0003A718
		public static HTuple GetChapterInfo(string chapter)
		{
			IntPtr proc = HalconAPI.PreCall(1118);
			HalconAPI.StoreS(proc, 0, chapter);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Query all available window types.</summary>
		/// <returns>Names of available window types.</returns>
		// Token: 0x0600093F RID: 2367 RVA: 0x0003C558 File Offset: 0x0003A758
		public static HTuple QueryWindowType()
		{
			IntPtr proc = HalconAPI.PreCall(1177);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Get the output treatment of an image matrix.</summary>
		/// <param name="windowHandle">Window handle.</param>
		/// <returns>Display mode for images.</returns>
		// Token: 0x06000940 RID: 2368 RVA: 0x0003C590 File Offset: 0x0003A790
		public static string GetComprise(HWindow windowHandle)
		{
			IntPtr proc = HalconAPI.PreCall(1251);
			HalconAPI.Store(proc, 0, windowHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			string result;
			num = HalconAPI.LoadS(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(windowHandle);
			return result;
		}

		/// <summary>Query the region display modes.</summary>
		/// <returns>region display mode names.</returns>
		// Token: 0x06000941 RID: 2369 RVA: 0x0003C5D8 File Offset: 0x0003A7D8
		public static HTuple QueryShape()
		{
			IntPtr proc = HalconAPI.PreCall(1252);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Query the possible line widths.</summary>
		/// <param name="min">Displayable minimum width.</param>
		/// <param name="max">Displayable maximum width.</param>
		// Token: 0x06000942 RID: 2370 RVA: 0x0003C610 File Offset: 0x0003A810
		public static void QueryLineWidth(out int min, out int max)
		{
			IntPtr proc = HalconAPI.PreCall(1254);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			num = HalconAPI.LoadI(proc, 0, num, out min);
			num = HalconAPI.LoadI(proc, 1, num, out max);
			HalconAPI.PostCall(proc, num);
		}

		/// <summary>Query the number of colors for color output.</summary>
		/// <returns>Tuple of the possible numbers of colors.</returns>
		// Token: 0x06000943 RID: 2371 RVA: 0x0003C658 File Offset: 0x0003A858
		public static HTuple QueryColored()
		{
			IntPtr proc = HalconAPI.PreCall(1257);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.INTEGER, num, out result);
			HalconAPI.PostCall(proc, num);
			return result;
		}

		/// <summary>Query information about the specified image acquisition interface.</summary>
		/// <param name="name">HALCON image acquisition interface name, i.e., name of the corresponding DLL (Windows) or shared library (Linux/macOS). Default: "File"</param>
		/// <param name="query">Name of the chosen query. Default: "info_boards"</param>
		/// <param name="valueList">List of values (according to Query).</param>
		/// <returns>Textual information (according to Query).</returns>
		// Token: 0x06000944 RID: 2372 RVA: 0x0003C694 File Offset: 0x0003A894
		public static string InfoFramegrabber(string name, string query, out HTuple valueList)
		{
			IntPtr proc = HalconAPI.PreCall(2034);
			HalconAPI.StoreS(proc, 0, name);
			HalconAPI.StoreS(proc, 1, query);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			string result;
			num = HalconAPI.LoadS(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, num, out valueList);
			HalconAPI.PostCall(proc, num);
			return result;
		}
	}
}
